home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / nntpdiffs / cdiff.1.5.5 < prev    next >
Text File  |  1989-06-27  |  6KB  |  249 lines

  1. Only in .: Cnews.diff
  2. Common subdirectories: ../nntp.1.5.5/common and ./common
  3. Common subdirectories: ../nntp.1.5.5/doc and ./doc
  4. Common subdirectories: ../nntp.1.5.5/inews and ./inews
  5. Common subdirectories: ../nntp.1.5.5/rrnpatches and ./rrnpatches
  6. Common subdirectories: ../nntp.1.5.5/server and ./server
  7. Common subdirectories: ../nntp.1.5.5/support and ./support
  8. Common subdirectories: ../nntp.1.5.5/xfer and ./xfer
  9. Common subdirectories: ../nntp.1.5.5/xmit and ./xmit
  10. diff -c -r ../nntp.1.5.5/server/Makefile ./server/Makefile
  11. *** ../nntp.1.5.5/server/Makefile    Tue Jun  6 22:46:14 1989
  12. --- ./server/Makefile    Tue Jun  6 23:33:45 1989
  13. ***************
  14. *** 3,8 ****
  15. --- 3,9 ----
  16.   #
  17.   
  18.   SRVROBJ = main.o serve.o access.o access_inet.o access_dnet.o active.o \
  19. +     batch.o \
  20.       ahbs.o globals.o group.o help.o ihave.o list.o misc.o netaux.o \
  21.       newgroups.o newnews.o nextlast.o ngmatch.o post.o parsit.o scandir.o \
  22.       slave.o spawn.o strcasecmp.o subnet.o time.o xhdr.o fakesyslog.o \
  23. ***************
  24. *** 9,14 ****
  25. --- 10,16 ----
  26.       ../common/version.o
  27.   
  28.   SRVRSRC = main.c serve.c access.c access_inet.c access_dnet.c active.c \
  29. +     batch.c \
  30.       ahbs.c globals.c group.c help.c ihave.c list.c misc.c netaux.c \
  31.       newgroups.c newnews.c nextlast.c ngmatch.c post.c parsit.c scandir.c \
  32.       slave.c spawn.c strcasecmp.c subnet.c time.c xhdr.c fakesyslog.c \
  33. ***************
  34. *** 19,25 ****
  35.   SRCS    = ${SRVRSRC}
  36.   
  37.   # -ldbm here if you've #define'ed DBM in ../common/conf.h
  38. ! LIBS    =
  39.   
  40.   CFLAGS    = -O
  41.   
  42. --- 21,27 ----
  43.   SRCS    = ${SRVRSRC}
  44.   
  45.   # -ldbm here if you've #define'ed DBM in ../common/conf.h
  46. ! LIBS    = -ldbm
  47.   
  48.   CFLAGS    = -O
  49.   
  50. Only in ./server: batch.c
  51. diff -c -r ../nntp.1.5.5/server/ihave.c ./server/ihave.c
  52. *** ../nntp.1.5.5/server/ihave.c    Tue Jun  6 22:46:12 1989
  53. --- ./server/ihave.c    Tue Jun  6 23:47:02 1989
  54. ***************
  55. *** 52,59 ****
  56.           (void) strcat(errbuf, " NNTP server out of space. Try later.");
  57.   
  58.           retcode = 0;        /* indicates that an error occurred */
  59. !     } else retcode =
  60. !         spawn(rnews, "rnews", (char *) 0, CONT_XFER, ERR_XFERFAIL, errbuf);
  61.   
  62.       if (retcode <= 0)
  63.           printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
  64. --- 52,65 ----
  65.           (void) strcat(errbuf, " NNTP server out of space. Try later.");
  66.   
  67.           retcode = 0;        /* indicates that an error occurred */
  68. !     } else 
  69. ! #ifdef UNBATCHED_INPUT
  70. !         retcode = spawn(rnews, "rnews", (char *) 0, CONT_XFER,
  71. !                 ERR_XFERFAIL, errbuf);
  72. ! #else
  73. !         /* C news input hook */
  74. !         retcode = batch_input_article(CONT_XFER, ERR_XFERFAIL, errbuf);
  75. ! #endif
  76.   
  77.       if (retcode <= 0)
  78.           printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
  79. diff -c -r ../nntp.1.5.5/server/misc.c ./server/misc.c
  80. *** ../nntp.1.5.5/server/misc.c    Tue Jun  6 22:46:12 1989
  81. --- ./server/misc.c    Tue Jun  6 23:33:46 1989
  82. ***************
  83. *** 80,86 ****
  84.    *
  85.    *    Side effects:    opens dbm database
  86.    *            (only once, keeps it open after that).
  87. -  *            Converts "msg_id" to lower case.
  88.    */
  89.   
  90.   #ifndef NDBM
  91. --- 80,85 ----
  92. ***************
  93. *** 113,122 ****
  94.       datum         key, content;
  95.   #endif USGHIST
  96.       static FILE    *hfp = NULL;    /* history file, text version */
  97. -     for (cp = msg_id; *cp != '\0'; ++cp)
  98. -         if (isupper(*cp))
  99. -             *cp = tolower(*cp);
  100.   
  101.   #ifdef USGHIST
  102.       hfp = fopen(histfile(msg_id), "r");
  103. --- 112,117 ----
  104. diff -c -r ../nntp.1.5.5/server/newnews.c ./server/newnews.c
  105. *** ../nntp.1.5.5/server/newnews.c    Tue Jun  6 22:48:36 1989
  106. --- ./server/newnews.c    Tue Jun  6 23:33:46 1989
  107. ***************
  108. *** 249,257 ****
  109.    *    Side effects:    Seeks in history file, modifies line.
  110.    */
  111.   
  112. ! seekuntil(fp, key, line, linesize)
  113.       FILE        *fp;
  114. !     char        *key;
  115.       char        *line;
  116.       int        linesize;
  117.   {
  118. --- 249,257 ----
  119.    *    Side effects:    Seeks in history file, modifies line.
  120.    */
  121.   
  122. ! seekuntil(fp, akey, line, linesize)
  123.       FILE        *fp;
  124. !     char        *akey;
  125.       char        *line;
  126.       int        linesize;
  127.   {
  128. ***************
  129. *** 258,264 ****
  130. --- 258,267 ----
  131.       char        datetime[32];
  132.       register int    c;
  133.       register long    top, bot, mid;
  134. +     extern long dtol();
  135. +     char key[30];
  136.   
  137. +     (void) sprintf(key, "%ld", dtol(akey));    /* akey -> time_t in ascii */
  138.       bot = 0;
  139.       (void) fseek(fp, 0L, 2);
  140.       top = ftell(fp);
  141. ***************
  142. *** 321,326 ****
  143. --- 324,332 ----
  144.   }
  145.   
  146.   
  147. + /*
  148. +  * C news version of getword.
  149. +  */
  150.   getword(fp, w, line, linesize)
  151.       FILE        *fp;
  152.       register char    *w;
  153. ***************
  154. *** 328,363 ****
  155.       int        linesize;
  156.   {
  157.       register char    *cp;
  158.   
  159.       if (fgets(line, linesize, fp) == NULL)
  160.           return (0);
  161. !     if (cp = index(line, '\t')) {
  162. ! /*
  163. !  * The following gross hack is present because the history file date
  164. !  * format is braindamaged.  They like "mm/dd/yy hh:mm", which is useless
  165. !  * for relative comparisons of dates using something like atoi() or
  166. !  * strcmp.  So, this changes their format into yymmddhhmm.  Sigh.
  167. !  *
  168. !  * 12345678901234    ("x" for cp[x])
  169. !  * mm/dd/yy hh:mm     (their lousy representation)
  170. !  * yymmddhhmm        (our good one)
  171. !  * 0123456789        ("x" for w[x])
  172. !  */
  173. !         *cp = '\0';
  174. !         (void) strncpy(w, cp+1, 15);
  175. !         w[0] = cp[7];        /* Years */
  176. !         w[1] = cp[8];
  177. !         w[2] = cp[1];        /* Months */
  178. !         w[3] = cp[2];
  179. !         w[4] = cp[4];        /* Days */
  180. !         w[5] = cp[5];
  181. !         w[6] = cp[10];        /* Hours */
  182. !         w[7] = cp[11];
  183. !         w[8] = cp[13];        /* Minutes */
  184. !         w[9] = cp[14];
  185. !         w[10] = '\0';
  186. !     } else
  187. !         w[0] = '\0';
  188.       return (1);
  189.   }
  190.   
  191. --- 334,356 ----
  192.       int        linesize;
  193.   {
  194.       register char    *cp;
  195. +     extern char *index();
  196.   
  197.       if (fgets(line, linesize, fp) == NULL)
  198.           return (0);
  199. !     w[0] = '\0';                /* in case of bad format */
  200. !     if (cp = index(line, '\t')) {        /* find 2nd field */
  201. !         register char *endp;
  202. !         *cp++ = '\0';
  203. !         endp = index(cp, '~');        /* end of date-received */
  204. !         if (endp == NULL)
  205. !             endp = index(cp, '\t');    /* end of expiry */
  206. !         if (endp != NULL) {
  207. !             (void) strncpy(w, cp, endp - cp);
  208. !             w[endp - cp] = '\0';
  209. !         }
  210. !     }
  211.       return (1);
  212.   }
  213.   
  214. diff -c -r ../nntp.1.5.5/server/serve.c ./server/serve.c
  215. *** ../nntp.1.5.5/server/serve.c    Tue Jun  6 22:48:36 1989
  216. --- ./server/serve.c    Tue Jun  6 23:41:46 1989
  217. ***************
  218. *** 263,268 ****
  219. --- 263,279 ----
  220.   
  221.       (void) fflush(stdout);
  222.   
  223. +       (void) fflush(stdout);
  224. + #ifndef UNBATCHED_INPUT
  225. +     {
  226. +         char errbuf[2 * NNTP_STRLEN];
  227. +   
  228. +         enqpartbatch(CONT_XFER, ERR_XFERFAIL, errbuf);
  229. +     }
  230. + #endif
  231.   #ifdef LOG
  232.       if (ferror(stdout))
  233.           syslog(LOG_ERR, "%s disconnect: %m", hostname);
  234. ***************
  235. *** 311,317 ****
  236.   #ifdef PROFILE
  237.       profile();
  238.   #endif
  239.       exit(0);
  240.   }
  241.   
  242. --- 322,327 ----
  243.